package com.vol.utils;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.vol.entity.SysUser;
import com.vol.entity.UserInfo;
import com.vol.mapper.SysUserMapper;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.List;

public class deptmentUtils {
    private List<Integer> deptList = new ArrayList<>();
    @Autowired
    private SysUserMapper sysUserMapper;
    @Autowired
    private HttpServletRequest request;
    @Autowired
    private UserContext userContext;

    public void GetDeptIds(){
        UserInfo userInfo = userContext.getUserInfo();
        LambdaQueryWrapper<SysUser> qw = new LambdaQueryWrapper<>();
        qw.eq(SysUser::getUserId,userInfo.getUser_Id());
        SysUser user = sysUserMapper.selectOne(qw);
        if(user!=null){
            String deptids = user.getDeptids();

        }
    }

}
